home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / ov_all.zip / TI633.ASC < prev    next >
Text File  |  1991-09-11  |  5KB  |  199 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.   PRODUCT  :  ObjectVision                           NUMBER  :  633
  8.   VERSION  :  1.0
  9.        OS  :  WIN
  10.      DATE  :  September 11, 1991                         PAGE : 1/3
  11.  
  12.     TITLE  :  Simulating a Paradox one to many relationship in
  13.               ObjectVision.
  14.  
  15.  
  16.  
  17.  
  18.   Description:  Linking Master and Detail tables is possible in
  19.   ObjectVision but not the capability to display more than one
  20.   detail record at a time.   Since there is also no mechanism to
  21.   control the scrolling of the detail records so that you remain
  22.   "locked" on the Master, you need to be aware that as you press
  23.   Next or Previous you can also change the Master as well as the
  24.   Detail records that you are viewing.
  25.  
  26.   This is a description of how to simulate a one to many
  27.   relationship in ObjectVision.  MASTER buttons control scrolling
  28.   records in a Master database.  DETAIL buttons control scrolling
  29.   records in a detail database.  The two tables remain in sync
  30.   unless one of the Master records is deleted, creating "orphans".
  31.  
  32.   This technical note assumes you have the following Paradox table
  33.   structures:
  34.  
  35.   MASTER.DB
  36.                   LAST            A20*
  37.                   FIRST           A20
  38.                   ADDRESS         A20
  39.  
  40.   DETAIL.DB
  41.                   LAST                    A20*
  42.                   ORDER NO.               N*
  43.                   ORDER DESC.             A20
  44.   (Asterisk means the field is keyed in Paradox.)
  45.  
  46.   How it works:
  47.  
  48.   In ObjectVision create five data fields on a form:  Last name,
  49.   Master first, Master address, Detail order no, and Detail
  50.   description.
  51.  
  52.   Create two Paradox links, Master link and Detail link.  One will
  53.   link with the Master table and the other will link with the
  54.   Detail table.  Use Tools|Links to create the Paradox table links.
  55.   The links should be setup as follows:
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.   PRODUCT  :  ObjectVision                           NUMBER  :  633
  74.   VERSION  :  1.0
  75.        OS  :  WIN
  76.      DATE  :  September 11, 1991                         PAGE : 2/3
  77.  
  78.     TITLE  :  Simulating a Paradox one to many relationship in
  79.               ObjectVision.
  80.  
  81.  
  82.  
  83.  
  84.   ObjectVision field      Master table/   Detail table/
  85.                                   Master link             Detail
  86.   link
  87.   ---------------------------------------------------------------------
  88.   Last name                           Last                Last
  89.   Master first                        First
  90.   Master last                         Last
  91.   Detail order no.                                        Order no.
  92.   Detail description                                      Order
  93.   Desc.
  94.  
  95.   Allow ObjectVision to create the default buttons when you create
  96.   the first link.  You may want to create 2 additional buttons so
  97.   that can get you to the first and last records in the database,
  98.   if so call them first and last and attach the appropriate
  99.   conclusion, @top("Master Link") and @bottom("Master Link").  So
  100.   that you cannot "orphan" any detail records you might also wish
  101.   to remove the Delete button for this master link.  Next modify
  102.   the names of these buttons using Properties|Field/Name to Master
  103.   Enter, Master Next, Master Previous and so on.
  104.  
  105.   When you create the second link allow ObjectVision to create the
  106.   default buttons automatically which it can now do if you have
  107.   renamed the original set of default buttons as described in the
  108.   previous paragraph.  If you have not modified the original
  109.   buttons, ObjectVision will ask you if you wish to create them for
  110.   this second (and subsequent links) but will be unable to do so
  111.   because the names will need to be unique and have already been
  112.   used.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.   PRODUCT  :  ObjectVision                           NUMBER  :  633
  140.   VERSION  :  1.0
  141.        OS  :  WIN
  142.      DATE  :  September 11, 1991                         PAGE : 3/3
  143.  
  144.     TITLE  :  Simulating a Paradox one to many relationship in
  145.               ObjectVision.
  146.  
  147.  
  148.  
  149.  
  150.   Pressing the buttons associated with the Master link scroll
  151.   through the Master table, showing the different names of people
  152.   in the tables.  Pressing the buttons associated with the Detail
  153.   link scroll through the order details of the tables.  As you
  154.   scroll through the detail records you will find that it is
  155.   possible to go to the next (or previous) master record so you
  156.   will have to watch out for this.
  157.  
  158.   This form is not designed to append records, or edit keyed
  159.   fields.  Some simple modification can make this possible.
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.